/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author YDZ
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface PmWatersupply extends BasicModel<PmWatersupply> {
  createDate?: string; // 发起时间
  name?: string; // 项目名称
  projectno?: string; // 项目编号
  createByName?: string; // 发起人名称
  createBy?: string; // 发起人编码
  checkresult?: string; // 验收结果
  fileno?: string; // fileno
  bpushed?: string; // 是否推送报装
}

export const pmWatersupplyList = (params?: PmWatersupply | any) =>
  defHttp.get<PmWatersupply>({ url: adminPath + '/accept/supply/pmWatersupply/list', params });

export const pmWatersupplyListData = (params?: PmWatersupply | any) =>
  defHttp.post<Page<PmWatersupply>>({
    url: adminPath + '/accept/supply/pmWatersupply/listData',
    params,
  });

export const pmWatersupplyForm = (params?: PmWatersupply | any) =>
  defHttp.get<PmWatersupply>({ url: adminPath + '/accept/supply/pmWatersupply/form', params });

export const pmWatersupplySave = (params?: any, data?: PmWatersupply | any) =>
  defHttp.postJson<PmWatersupply>({
    url: adminPath + '/accept/supply/pmWatersupply/save',
    params,
    data,
  });

// /accept/supply/pmWatersupply/uploadMoreFile
export const pmWatersupplyUploadMoreFile = (params?: any, data?: PmWatersupply | any) =>
  defHttp.postJson<PmWatersupply>({
    url: adminPath + '/accept/supply/pmWatersupply/uploadMoreFile',
    params,
    data,
  });

export const pmWatersupplyDelete = (params?: PmWatersupply | any) =>
  defHttp.get<PmWatersupply>({ url: adminPath + '/accept/supply/pmWatersupply/delete', params });

export const pmWatersupplyCancel = (params?: PmWatersupply | any) =>
  defHttp.get<PmWatersupply>({ url: adminPath + '/accept/supply/pmWatersupply/cancel', params });

// export const pmWatersupplySubmit = (params?: PmWatersupply | any) =>
//   defHttp.get<PmWatersupply>({ url: adminPath + '/accept/supply/pmWatersupply/submit', params });
export const pmWatersupplySubmit = (params?: any, data?: PmWatersupply | any) =>
  defHttp.postJson<PmWatersupply>({
    url: adminPath + '/accept/supply/pmWatersupply/submit',
    params,
    data,
  });
